//extends 继承 通过继承这种特性能够抽象出来相似类型之间重复的地方
class Person{
    constructor(name){
        this.name = name
    }

    say(){
        console.log(`hi,my name is ${this.name}`)
    }
}

class Student extends Person {//student 类型就有person类型中所有的成员了
    constructor(name,number){
        super(name)//super 始终指向父类，调用它则调用了父类的构造函数
        this.number = number
    }
    hello(){
        super.say()// hi,my name is jack
        console.log(`my school number is ${this.number}`)// my school number is 100
    }
}

const s = new Student('jack','100')
s.hello()